import axios from 'axios'

export const baseUrl = 'http://localhost:4000'
const axiosInstance = axios.create({
  baseURL: baseUrl
})
// 拦截器
axiosInstance.interceptors.response.use(
  res => res.data,
  err => {
    console.log(err, '网络错误')
  }
)

export { axiosInstance }

// 歌手种类
export const categoryTypes = [
  {
    name: '华语男',
    id: '1001'
  },
  {
    name: '华语女',
    id: '1002'
  },
  {
    name: '华语组合',
    id: '1003'
  },
  {
    name: '欧美男',
    id: '2001'
  },
  {
    name: '欧美女',
    id: '2002'
  },
  {
    name: '欧美组合',
    id: '2003'
  },
  {
    name: '日本男',
    id: '6001'
  },
  {
    name: '日本女',
    id: '6002'
  },
  {
    name: '日本组合',
    id: '6003'
  },
  {
    name: '韩国男',
    id: '7001'
  },
  {
    name: '韩国女',
    id: '7002'
  },
  {
    name: '韩国组合',
    id: '7003'
  },
  {
    name: '其他男歌手',
    id: '4001'
  },
  {
    name: '其他女歌手',
    id: '4002'
  },
  {
    name: '其他组合',
    id: '4003'
  }
]

export const singerTypes = [
  {
    id: '-1',
    name: '全部'
  },
  {
    id: '1',
    name: '男歌手'
  },
  {
    id: '2',
    name: '女歌手'
  },
  {
    id: '3',
    name: '乐队'
  }
]

export const areaTypes = [
  {
    id: '-1',
    name: '全部'
  },
  {
    id: '7',
    name: '华语'
  },
  {
    id: '96',
    name: '欧美'
  },
  {
    id: '8',
    name: '日本'
  },
  {
    id: '16',
    name: '韩国'
  },
  {
    id: '0',
    name: '其他'
  }
]

// 歌手首字母
export const alphaTypes = [
  {
    id: 'A',
    name: 'A'
  },
  {
    id: 'B',
    name: 'B'
  },
  {
    id: 'C',
    name: 'C'
  },
  {
    id: 'D',
    name: 'D'
  },
  {
    id: 'E',
    name: 'E'
  },
  {
    id: 'F',
    name: 'F'
  },
  {
    id: 'G',
    name: 'G'
  },
  {
    id: 'H',
    name: 'H'
  },
  {
    id: 'I',
    name: 'I'
  },
  {
    id: 'J',
    name: 'J'
  },
  {
    id: 'K',
    name: 'K'
  },
  {
    id: 'L',
    name: 'L'
  },
  {
    id: 'M',
    name: 'M'
  },
  {
    id: 'N',
    name: 'N'
  },
  {
    id: 'O',
    name: 'O'
  },
  {
    id: 'P',
    name: 'P'
  },
  {
    id: 'Q',
    name: 'Q'
  },
  {
    id: 'R',
    name: 'R'
  },
  {
    id: 'S',
    name: 'S'
  },
  {
    id: 'T',
    name: 'T'
  },
  {
    id: 'U',
    name: 'U'
  },
  {
    id: 'V',
    name: 'V'
  },
  {
    id: 'W',
    name: 'W'
  },
  {
    id: 'X',
    name: 'X'
  },
  {
    id: 'Y',
    name: 'Y'
  },
  {
    id: 'Z',
    name: 'Z'
  }
]

export const HEADER_HEIGHT = 45

export const playMode = {
  sequence: 0,
  loop: 1,
  random: 2
}
